<ng-content></ng-content>
<ng-template
  #overlay="cdkConnectedOverlay"
  cdkConnectedOverlay
  [cdkConnectedOverlayOrigin]="overlayOrigin"
  [cdkConnectedOverlayHasBackdrop]="_hasBackdrop"
  (backdropClick)="hide()"
  (detach)="hide()"
  (positionChange)="onPositionChange($event)"
  [cdkConnectedOverlayPositions]="_positions"
  [cdkConnectedOverlayOpen]="visible$ | async">
  <div class="ant-popover" [ngClass]="_classMap" [ngStyle]="nzOverlayStyle" [@fadeAnimation]="''+(visible$ | async)"
    (@fadeAnimation.done)="_afterVisibilityAnimation($event)">
    <div class="ant-popover-content">
      <div class="ant-popover-arrow"></div>
      <div class="ant-popover-inner">
        <div class="ant-popover-title" *ngIf="nzTitle">
          <ng-container *ngIf="isTitleString; else titleTemplate">{{ nzTitle }}</ng-container>
          <ng-template #titleTemplate>
            <ng-template [ngTemplateOutlet]="nzTitle"></ng-template>
          </ng-template>
        </div>
        <div class="ant-popover-inner-content">
          <ng-container *ngIf="isContentString; else contentTemplate">{{ nzContent }}</ng-container>
          <ng-template #contentTemplate>
            <ng-template [ngTemplateOutlet]="nzContent"></ng-template>
          </ng-template>
        </div>
      </div>
    </div>
  </div>
</ng-template>